package cn.edu.gdpt.mobile213.mobile2121606097wjc0503;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

public class MainActivity extends AppCompatActivity {
    private RecyclerView rvMainPart;
    private int[] partID={R.drawable.line01_01,R.drawable.line01_02,R.drawable.line01_03,
            R.drawable.line01_04,R.drawable.line01_05,R.drawable.line01_06,R.drawable.line01_07,
            R.drawable.line01_08,R.drawable.line01_09,R.drawable.line01_10,R.drawable.line01_11};
    private String[] partNmaes={"轿车车型生产环节1 轿车汽车放置底盘","轿车车型生产环节2 轿车汽车左前悬挂","轿车车型生产环节3 轿车汽车右前悬挂","轿车车型生产环节4 轿车汽车左后悬挂",
             "轿车车型生产环节5 轿车汽车右后悬挂","轿车车型生产环节6 轿车汽车固定车架","轿车车型生产环节7 轿车汽车发动机","轿车车型生产环节8 轿车汽车椅子","轿车车型生产环节9 轿车汽车方向盘",
            "轿车车型生产环节10 轿车汽车左前车门","轿车车型生产环节11 轿车汽车右前车门",};
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        rvMainPart.setLayoutManager(new LinearLayoutManager(this));
        PartRVAdapter adapter=new PartRVAdapter(partID,partNmaes);
        rvMainPart.setAdapter(adapter);
    }

    private void initView() {
        rvMainPart=(RecyclerView) findViewById(R.id.rvMainPart);
    }
}